Common format standards for smooth playback of video files include displaying thirty frames of video for each second of a video timeline. During the video editing process, smooth playback of video frames and audio sequences that make up video and audio files is often not obtained due to the processing of video files and the individual video frames and audio sequences that must occur prior to displaying the video file to a screen and outputting audio sequences to a speaker.
Several processes occur in video editing and playback which require central processing unit (CPU) resources. A number of these processes are part of the “pre-roll logic” which includes seeking for files, opening and decoding a first video file, rendering effects to the video frames of the file, displaying the frames to a screen, and closing the first video file, opening and decoding a second video file, and so forth. Similarly, the processing of audio sequences of an audio file as well as synchronization with video frames also requires CPU processing capacity. The CPU typically cannot perform all processes of the pre-roll logic in the time it takes for one frame of video to be displayed (e.g., one-thirtieth of a second) in order to smoothly playback the video and audio files. Consequently, video and audio playback appears choppy or halting (i.e., glitching) as the CPU performs the required pre-roll logic processes at a rate that is less than the video timeline.
Video playback in reverse also requires significant CPU resources. In addition to glitching in forward playback of video files, reverse playback of most compressed video file formats, (e.g., WMV), cannot be performed in real time. I-Frame-based video files, which is a common form of real time video format, store video frames as the difference from the previous frame. Thus, in order to playback video frame X, one must first determine the differences between frame X and the frame immediately preceding it on the video timeline (e.g., frame X-1). Therefore, reverse playback of video can be very expensive operations for the CPU to process, requiring the CPU to decode all the previous frames to the preceding key frame in a video file. Once decoded, video effects must be rendered by the CPU, consuming more of its processing resources. This process makes it difficult for the CPU to decode, render, synchronize the video frames with the audio sequences, and playback the video file in real time.
In addition to the processes of the pre-roll logic, CPU processing resources can be consumed by scheduled or random processes that occur in the background, such as receiving an email, which further limit the CPU resources that can be provided to performing the process of the pre-roll logic. Thus, as scheduled or random processes further require CPU processing time, more glitches in the video playback can occur.
Accordingly, a system and method for smooth playback of video in forward and reverse timeline directions is desired to address one or more of these and other disadvantages.